On the bottom - up evaluation of recursive queries

نویسنده

  • Yangjun Chen
چکیده

In this paper, we present an optimal bottom-up evaluation method for handling both linear and non-linear recursion. Based on the well-known magic-set method, we develop a technique: labelling to record the cyclic paths during the execution of the first phase of the magic-set method and suspending the computation for the cyclic data in the second phase to avoid the redundant evaluation. Then we postpone this computation to an iteration process (the third phase) which evaluates the remaining answers only along each cyclic path. In this way, we can guarantee the completeness. In addition, for a large class of programs we further optimize our method by elaborating the iteration process and generating most answers for each cyclic path directly from the intermediate results instead of evaluating them by performing algebraic operations (after some of answers for the first cyclic path are produced). Because the cost of generating an answer is much less than that of evaluating an answer, this optimization is significant.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Efficient Implementation of Loops in Bottom-Up Evaluation of Logic Queries

We consider the efficient implementation of the bottom-up evaluation method for recursive queries in logic databases. In the bottom-up evaluation algorithms the non-mutually-recursive rules are evaluated in certain order, whereas the evaluation order within a set of the mutually recursive rules is free. However, significant savings in join operations can be achieved by arranging the mutually re...

متن کامل

On the Power of Magic Catriel Beeri* and Raghu Ramakrishnan+

D This paper considers the efficient evaluation of recursive queries expressed using Horn clauses. We define sideways information passing formally and show how a query evaluation algorithm may be defined in terms of sideways information passing and control. We then consider a class of information-passing strategies that suffices to describe most query evaluation algorithms in the database liter...

متن کامل

Query Evaluation in Recursive Databases: Bottom-up and Top-down Reconciled

It is desirable to answer queries' posed to deductive databases by computing fixpoints because such computations are directly amenable to set-oriented fact processing. However, the classical fixpoint procedures based on bottom-up processingthe naive and semi-naive methodsare rather primitive and often inefficient. In this article, we rely on bottom-up meta-interpretation for formalizing a new f...

متن کامل

Bottom-up Evaluation of Finitely Recursive Queries

The support for function symbols in logic programming under Answer Set Programming semantics (ASP) allows to overcome some modeling limitations of traditional ASP systems, such as the inability of handling infinite domains. On the other hand, admitting function symbols in ASP makes inference undecidable in the general case. Thus, the research is lately focusing on finding proper subclasses of A...

متن کامل

Deductive and Object-Oriented Databases

It is desirable to answer queries posed to deductive databases by computing fix-points because such computations are directly amenable to set-oriented fact processing. However, the classical fixpoint procedures based on bottom-up reasoning-the naive and semi-naive methods-are rather primitive and often inefficient. In this article, we rely on bottom-up meta-interpretation for formalizing a new ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Int. J. Intell. Syst.

دوره 11  شماره 

صفحات  -

تاریخ انتشار 1996